<?php
/**
 * Created by PhpStorm.
 * User: dell
 * Date: 2017/6/17
 * Time: 15:08
 */

namespace Weixin\Component\Cookie;


use Common\Common\Component;

class CookieComponent extends Component
{
    public function setCookie($openid, $user_id)
    {
        cookie('openid', $openid, 3600);
        cookie('user_id', $user_id, 3600);
    }

    public function getOpenId()
    {
        return cookie('openid');
    }

    public function getUserId()
    {
        return cookie('user_id');
    }
}